"======================================================================
"
" init.vim - 初始化配置 
"
"======================================================================


" 防止重复加载
if get(s:, 'loaded', 0) != 0
    finish
else
    let s:loaded = 1
endif

" 取得本文件所在的目录
let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')

" 定义一个命令用来加载文件
command! -nargs=1 LoadScript exec 'so '.s:home.'/'.'<args>'

" 将 vim-init 目录加入 runtimepath
exec 'set rtp+='.s:home


"----------------------------------------------------------------------
" 模块加载
"----------------------------------------------------------------------

" 加载基础配置
LoadScript init/init-basic.vim

" 加载功能配置
LoadScript init/init-config.vim

" 自定义按键
LoadScript init/init-keymaps.vim

" 插件声明
LoadScript init/init-plugins.vim

" UI样式插件配置
LoadScript init/init-plugin-ui.vim

" 代码编辑插件配置
LoadScript init/init-plugin-edit.vim

" coc
LoadScript init/init-plugin-coc.vim

" 基础样式
LoadScript init/init-style.vim

